home *** CD-ROM | disk | FTP | other *** search
- Path: solon.com!not-for-mail
- From: seebs@solutions.solon.com (Peter Seebach)
- Newsgroups: comp.lang.c
- Subject: Re: Interesting program
- Date: 17 Apr 1996 15:58:59 -0500
- Organization: Usenet Fact Police (Undercover)
- Message-ID: <4l3m2j$bav@solutions.solon.com>
- References: <4kshg7$a93@mirv.unsw.edu.au>
- Reply-To: seebs@solon.com
- NNTP-Posting-Host: solutions.solon.com
-
- In article <4kshg7$a93@mirv.unsw.edu.au>,
- system PRIVILEGED account <root> wrote:
- >Did someone knows how to write a program when compiled and executed, will
- >produced the source code itself? For example, the name of the program is
- >hello.c, when I compiled it and executed it like this
-
- > hello>output
-
- >output will the same as hello.c!
-
- It's possible, but harder than it looks; the most commonly quoted one has two
- bugs, others may have more.
-
- Common mistakes:
- No prototype for printf(). No trailing newline. ASCII dependant.
-
- -s
- --
- Peter Seebach - seebs@solon.com - Copyright 1996 Peter Seebach.
- C/Unix wizard -- C/Unix questions? Send mail for help. No, really!
- Unsolicited email is not welcome, and will be billed for at consulting rates.
- The *other* C FAQ - http://www.solon.com/~seebs/c/c-iaq.html
-